package com.fanqwz.hexieshe.dagger.module;

import android.support.v7.app.ActionBar;

import com.fanqwz.hexieshe.Navigator;
import com.fanqwz.hexieshe.activity.BaseActivity;
import com.fanqwz.hexieshe.dagger.PerActivity;

import dagger.Module;
import dagger.Provides;

/**
 * Created by fanqw on 2017/6/30.
 */

@Module
public class ActivityModule {
    private final BaseActivity activity;

    public ActivityModule(BaseActivity activity) {
        this.activity = activity;
    }

    @Provides
    @PerActivity
    BaseActivity provideActivity() {
        return activity;
    }

    @Provides
    @PerActivity
    ActionBar provideActionBar() {
        return activity.getSupportActionBar();
    }

    @Provides
    @PerActivity
    Navigator provideNavigator() {
        return activity.provideNavigator();
    }

//    @Provides
//    @PerActivity
//    FragmentManager provideFragmentManager() {
//        return activity.getSupportFragmentManager();
//    }
}
